package com.ruoyi.stock.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock.mapper.QwGuessdailyMapper;
import com.ruoyi.stock.domain.QwGuessdaily;
import com.ruoyi.stock.service.IQwGuessdailyService;

/**
 * 每日猜想Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-16
 */
@Service
public class QwGuessdailyServiceImpl implements IQwGuessdailyService 
{
    @Autowired
    private QwGuessdailyMapper qwGuessdailyMapper;

    /**
     * 查询每日猜想
     * 
     * @param id 每日猜想主键
     * @return 每日猜想
     */
    @Override
    public QwGuessdaily selectQwGuessdailyById(Long id)
    {
        return qwGuessdailyMapper.selectQwGuessdailyById(id);
    }

    /**
     * 查询每日猜想列表
     * 
     * @param qwGuessdaily 每日猜想
     * @return 每日猜想
     */
    @Override
    public List<QwGuessdaily> selectQwGuessdailyList(QwGuessdaily qwGuessdaily)
    {
        return qwGuessdailyMapper.selectQwGuessdailyList(qwGuessdaily);
    }

    /**
     * 新增每日猜想
     * 
     * @param qwGuessdaily 每日猜想
     * @return 结果
     */
    @Override
    public int insertQwGuessdaily(QwGuessdaily qwGuessdaily)
    {
        qwGuessdaily.setCreateTime(DateUtils.getNowDate());
        return qwGuessdailyMapper.insertQwGuessdaily(qwGuessdaily);
    }

    /**
     * 修改每日猜想
     * 
     * @param qwGuessdaily 每日猜想
     * @return 结果
     */
    @Override
    public int updateQwGuessdaily(QwGuessdaily qwGuessdaily)
    {
        return qwGuessdailyMapper.updateQwGuessdaily(qwGuessdaily);
    }

    /**
     * 批量删除每日猜想
     * 
     * @param ids 需要删除的每日猜想主键
     * @return 结果
     */
    @Override
    public int deleteQwGuessdailyByIds(Long[] ids)
    {
        return qwGuessdailyMapper.deleteQwGuessdailyByIds(ids);
    }

    /**
     * 删除每日猜想信息
     * 
     * @param id 每日猜想主键
     * @return 结果
     */
    @Override
    public int deleteQwGuessdailyById(Long id)
    {
        return qwGuessdailyMapper.deleteQwGuessdailyById(id);
    }
}
